This file is a Mathematica notebook that gives some examples of what Mathematica can do. For information on how to read this notebook, see the file READ1ST.MA.
This file is loosely based on the "Tour of Mathematica" in Mathematica: A System for Doing Mathematics by Computer, Second Edition, by Stephen Wolfram. This book was published by Addison-Wesley in 1991, and is available at most bookstores. For information on how to obtain copies of Mathematica itself, see the section "Buying Mathematica" in the file READ1ST.MA.
The first line here is what you type into Mathematica. The second line is the result Mathematica gives. If you are reading this notebook on a color system, the input and output are blue, with the input in boldface.
Mathematica will also solve linear programming problems. This returns a list containing the maximum value of the "objective function" and the point at which it is attained.
Many integrals do not have a "closed form solution". If you give Mathematica such a definite integral it will be returned unevaluated. You can still use N to get a numerical answer.
Mathematica can also solve differential equations. Here is a pair of simultaneous differential equations. The solution you get involves two undetermined coefficients.
It is a mathematical fact that most differential equations do not have an explicit symbolic solution. In these cases you can get a numerical approximation to the solution using NDSolve. After the solution is computed it is plotted.
It is a fact of mathematics that there is no way to get an exact formula for the solutions of a quintic equation like this. You can nevertheless ask Mathematica to give you numerical results. You get the five complex number roots to the equation.
When equations contain complicated functions there is in general no systematic procedure for finding all solutions, even numerically. The Mathematica function FindRoot searches for a numerical solution to an equation, starting at a specified point.
This shows the dodecahedron as a three-dimensional graphical object.
As another example, we can use the definitions from the polyhedra package to create an image of a stellated icosahedron, which is often used as an icon for the Mathematica system.
There are several styles of programming in Mathematica. One of them is procedural programming, as you would find in a standard structured programming language such as C or Pascal.
Another is "rule-based programming". The idea is to give transformation rules which specify how Mathematica should transform expressions it receives as input.
You can give rules that mimic the formulas you might find in a mathematics textbook.
Here is an example of how you might teach Mathematica about a new form of logarithm function, called nlog.
Another style of programming you can use in Mathematica is functional programming. In functional programming, you specify a collection of functions to apply. This style of programming often yields compact, elegant programs that make good use of Mathematica's many integrated capabilities.
Mathematica consists of two parts -- the "kernel", which actually does computations, and the "front end", which deals with interaction with the user. The kernel of Mathematica is essentially the same on all computers that support Mathematica. The front end, on the other hand, works differently on different kinds of computers.
Mathematica for Windows has a sophisticated front end that takes advantage of the Windows graphical user interface.
One of the most important aspects of the Windows front end is its ability to support Mathematica notebooks.
This file is an example of a notebook. Notebooks consist of a mixture of text, graphics, and Mathematica input.
Notebooks can be used like "interactive textbooks" -- you read the text in the notebook, then use the Mathematica input in the notebook to perform calculations.